package com.canyou.basic.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.canyou.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 上传文件资源表
 * </p>
 *
 * @author canyou
 * @since 2020-08-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("basic_media")
@ApiModel(value="Media对象", description="上传文件资源表")
public class Media extends BaseModel {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "通过算法计算资源的hash值")
    @TableField("hash_code")
    private String hashCode;

    @ApiModelProperty(value = "上传时原来的资源名字")
    @TableField("original_media_name")
    private String originalMediaName;

    @ApiModelProperty(value = "资源名字")
    @TableField("media_name")
    private String mediaName;

    @ApiModelProperty(value = "mime类型")
    @TableField("mime_type")
    private String mimeType;

    @ApiModelProperty(value = "存储方式的类型(1.本地存储,2.七牛,3.阿里,4.minio)")
    @TableField("store_type")
    private Integer storeType;

    @ApiModelProperty(value = "资源类型(1.image,2.excel,3.word,4.pdf,5.zip)")
    @TableField("media_type")
    private Integer mediaType;

    @ApiModelProperty(value = "存储路径")
    @TableField("media_path")
    private String mediaPath;

    @ApiModelProperty(value = "资源大小")
    @TableField("media_size")
    private Long mediaSize;

    @ApiModelProperty(value = "资源详情描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "访问类型(1.公开,2.私有,3.授权)")
    @TableField("access_type")
    private Integer accessType;


}
